    package net.minecraft.src;

    import java.util.Random;

    public class mod_Periodic extends BaseMod
   {
       public static final Block TinOre = (new BlockTinOre(102, ModLoader.addOverride("/terrain.png", "/Periodic/TinOre.png"))).setHardness(2.0F).setStepSound(Block.soundStoneFootstep).setBlockName("TinOre");
       public static final Item TinItem = new Item(1501).setItemName("ingotTin");
       public static final Block CopperOre = (new BlockCopperOre(101, ModLoader.addOverride("/terrain.png", "/Periodic/copperOre.png"))).setHardness(2.0F).setStepSound(Block.soundStoneFootstep).setBlockName("CopperOre");
       public static final Item CopperItem = new Item(1500).setItemName("ingotCopper");
       public static final Item BronzeItem = new Item(1502).setItemName("ingotBronze");
       public static final Item BronzePick = new ItemPickaxe(1700, EnumToolMaterial.IRON).setItemName("Bronze Pick");
       public static final Item BronzeShovel = new ItemSpade(1701, EnumToolMaterial.IRON).setItemName("Bronze Shovel");
       public static final Item BronzeAxe = new ItemAxe(1702, EnumToolMaterial.IRON).setItemName("Bronze Axe");
       public static final Item BronzeHoe = new ItemHoe(1703, EnumToolMaterial.IRON).setItemName("Bronze Hoe");
       public static final Item BronzeSword = new ItemSword(1704, EnumToolMaterial.IRON).setItemName("Bronze Sword");
	   public static final Block Sodium = (new BlockSodium(104, ModLoader.addOverride("/terrain.png", "/Periodic/sodium3.png"))).setHardness(0.5F).setStepSound(Block.soundSandFootstep).setBlockName("Sodium");
	   public static final Block Calcium = (new BlockCalcium(105, ModLoader.addOverride("/terrain.png", "/Periodic/calcium3.png"))).setHardness(0.5F).setStepSound(Block.soundSandFootstep).setBlockName("Calcium");
	   public static final Item SodiumItem = new Item(1503).setItemName("DustSodium");
	   public static final Item CalciumItem = new Item(1504).setItemName("DustCalcium");
    
	
       public mod_Periodic()
       {
          ModLoader.RegisterBlock(CopperOre);
          ModLoader.RegisterBlock(TinOre); 
		  ModLoader.RegisterBlock(Sodium);
		  ModLoader.RegisterBlock(Calcium);
          ModLoader.AddSmelting(TinOre.blockID, new ItemStack(TinItem, 1));
          ModLoader.AddSmelting(CopperOre.blockID, new ItemStack(CopperItem, 1));
          ModLoader.AddName(CopperItem, "Copper");
          ModLoader.AddName(TinOre, "Tin Ore");
          ModLoader.AddName(TinItem, "Tin");	  
          ModLoader.AddName(CopperOre, "Copper Ore");
          ModLoader.AddName(BronzeItem, "Bronze");
		  ModLoader.AddName(BronzePick, "Bronze Pickaxe");
          ModLoader.AddName(BronzeShovel, "Bronze Shovel");
          ModLoader.AddName(BronzeAxe, "Bronze Axe");
          ModLoader.AddName(BronzeSword, "Bronze Sword");
          ModLoader.AddName(BronzeHoe, "Bronze Hoe");
		  ModLoader.AddName(Sodium, "Halite");
		  ModLoader.AddName(Calcium, "Calcite");
		  ModLoader.AddName(SodiumItem, "Sodium Dust");
		  ModLoader.AddName(CalciumItem, "Calcium Dust");
          BronzeItem.iconIndex = ModLoader.addOverride("/gui/items.png", "/Periodic/bronzeitem.png");
          BronzePick.iconIndex = ModLoader.addOverride("/gui/items.png", "/Periodic/bpick.png");
          BronzeShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Periodic/bshov.png");
          BronzeAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Periodic/baxe.png");
          BronzeHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Periodic/bhoe.png");
          BronzeSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Periodic/bsword.png");
          CopperItem.iconIndex = ModLoader.addOverride("/gui/items.png", "/Periodic/copperitem.png");
          TinItem.iconIndex = ModLoader.addOverride("/gui/items.png", "/Periodic/tinitem.png");
		  SodiumItem.iconIndex = ModLoader.addOverride("/gui/items.png", "/Periodic/sodium2.png");
          CalciumItem.iconIndex = ModLoader.addOverride("/gui/items.png", "/Periodic/calcium2.png");
          ModLoader.AddShapelessRecipe(new ItemStack(BronzeItem,1), new Object[] {new ItemStack(CopperItem,3), new ItemStack(TinItem,1)
		});      
          ModLoader.AddRecipe(new ItemStack(BronzePick, 1), new Object[] {
            "XXX", " | ", " | ", Character.valueOf('X'), BronzeItem, Character.valueOf('|'), Item.stick
        });
          ModLoader.AddRecipe(new ItemStack(BronzeShovel, 1), new Object[] {
            " X ", " | ", " | ", Character.valueOf('X'), BronzeItem, Character.valueOf('|'), Item.stick
        });
          ModLoader.AddRecipe(new ItemStack(BronzeAxe, 1), new Object[] {
            "XX ", "X| ", " | ", Character.valueOf('X'), BronzeItem, Character.valueOf('|'), Item.stick
        });
          ModLoader.AddRecipe(new ItemStack(BronzeHoe, 1), new Object[] {
            "XX ", " | ", " | ", Character.valueOf('X'), BronzeItem, Character.valueOf('|'), Item.stick
        });
          ModLoader.AddRecipe(new ItemStack(BronzeSword, 1), new Object[] {
            " X ", " X ", " | ", Character.valueOf('X'), BronzeItem, Character.valueOf('|'), Item.stick
        });
		  ModLoader.AddRecipe(new ItemStack(Sodium, 1), new Object[] {
		   "X", Character.valueOf('X'), Block.sand
		});
		  ModLoader.AddRecipe(new ItemStack(Calcium, 1), new Object[] {
		   "X", Character.valueOf('X'), Block.dirt
		});
	   }
   
    public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
    {
        for(int i = 0; i < 17; i++)
        {
            int randPosX = chunkX + rand.nextInt(16);
            int randPosY = rand.nextInt(64);
            int randPosZ = chunkZ + rand.nextInt(16);
            (new WorldGenMinable(TinOre.blockID, 4)).generate(world, rand, randPosX, randPosY, randPosZ );
            (new WorldGenMinable(CopperOre.blockID, 6)).generate(world, rand, randPosX, randPosY, randPosZ );
        }
        for(int i = 0; i < 20; i++)
        {
            int randPosX = chunkX + rand.nextInt(16);
            int randPosY = rand.nextInt(50);
            int randPosZ = chunkZ + rand.nextInt(16);
            (new WorldGenMinable(TinOre.blockID, 6)).generate(world, rand, randPosX, randPosY, randPosZ );
            (new WorldGenMinable(CopperOre.blockID, 8)).generate(world, rand, randPosX, randPosY, randPosZ );
        }
        for(int i = 0; i < 17; i++)
        {
            int randPosX = chunkX + rand.nextInt(16);
            int randPosY = rand.nextInt(30);
            int randPosZ = chunkZ + rand.nextInt(16);
            (new WorldGenMinable(TinOre.blockID, 8)).generate(world, rand, randPosX, randPosY, randPosZ );
            (new WorldGenMinable(CopperOre.blockID, 10)).generate(world, rand, randPosX, randPosY, randPosZ );
        }
	
	}

       public String Version()
      {
          return "1.5_01";
      }
	  
    }